
/*显示菜单*/
function turnit(n)
{
if (getObject("bb"+n).style.visibility == "hidden") {
getObject("bb"+n).style.visibility="visible"
if (n==1) {
 var tmp = getObject('menutxt'+n).value
 menulogin(tmp)
}
}
else
{
getObject("bb"+n).style.visibility="hidden"
}

}

/*移到菜单区*/
function over1 (n){
	 getObject("bb"+n).style.visibility="visible"
}
/*选中选项*/
function sele(n,m)
{
var tmpstr = ""
var ss = getObject('t'+n+"_"+m).innerHTML
var k = ss.replace(" ","")
if (n==1) {
getObject('menutxt'+n).value=k;
menulogin(k)
}

}

/*移动上选项上*/
function over(n,m){
getObject('t'+n+"_"+m).className='ss'
}
/*离开选项上*/
function out1(n,m){
getObject('t'+n+"_"+m).className=''
}
/*离开菜单区*/
function out()
{ 
	getObject('bb1').style.visibility="hidden"
	
}

/*用户登录区菜单*/
function menulogin(n){
	var menuOpt = new Array ("北京","天津","重庆","上海","吉林","辽宁","河北")
	var tmpstr = ""
	for (var i=0;i<menuOpt.length;i++) {
		if (menuOpt[i]!=n) {
			tmpstr+="<li style='cursor:pointer;height:19px!important;height:18px;padding-top:3px!important;padding-top:4px;text-indent:4px' id='t1_"+i+"' onmouseover =over(1,"+i+") onclick=sele(1,"+i+") onmouseout=out1(1,"+i+")>"+menuOpt[i]+"</li>"
		}
	}
	var start = "<ul style='width:100%;margin:0;padding:0'>"
	var end = "</ul>"
	var str = start + tmpstr + end
	getObject("bb1").innerHTML = str
}

function getObject(objectId) {
   if(document.getElementById && document.getElementById(objectId)) {
// W3C DOM
return document.getElementById(objectId);
   } else if (document.all && document.all(objectId)) {
// MSIE 4 DOM
return document.all(objectId);
   } else if (document.layers && document.layers[objectId]) {
// NN 4 DOM.. note: this won't find nested layers
return document.layers[objectId];
   } else {
return false;
   }
}
